<?php echo form_open('', 'id="comment_form_submit"'); ?>
<div class="row row-sm">
    <?php if ($this->user->is_loggedIn()) { ?>
        <div class="col-sm-1 hidden-xs">
            <img class="thumbnail img-responsive" src="<?php echo $this->user->get_Avatar(50, 50); ?>"
                 alt=""/>
        </div>
    <?php } ?>
    <div class="col-xs-12 col-sm-<?php echo($this->user->is_loggedIn() ? '11' : '12'); ?>">
        <?php if (!$this->user->is_loggedIn()) { ?>
            <div class="form-group">
                <div class="row row-sm">
                    <div class="col-sm-6">
                        <div class="input-group input-group-sm">
                            <span class="input-group-addon"><i class="fa fa-user"></i></span>
                            <input name="guest_name" type="text" class="form-control" id="guest_name"
                                   value="<?php echo set_value('guest_name'); ?>"
                                   placeholder="网名">
                        </div>
                    </div>
                    <div class="col-sm-6">
                        <div class="input-group input-group-sm">
                            <span class="input-group-addon"><i class="fa fa-envelope"></i></span>
                            <input name="guest_email" type="email" class="form-control" id="guest_email"
                                   value="<?php echo set_value('guest_email'); ?>"
                                   placeholder="邮箱">
                        </div>
                    </div>
                </div>
            </div>

        <?php } ?>
        <textarea class="form-control input-sm" name="comment_text"
                  id="comment_text"><?php echo set_value('comment_text'); ?></textarea>

        <div class="pull-left">
            <p class="help-block">
                <small>禁止使用html</small>
            </p>
        </div>
        <div class="pull-right m_t_5">
            <input type="hidden" name="submit_comment" value="submit_comment"/>
            <button id="submit_comment" class="btn btn-success btn-sm" name="submit_comment" type="submit">
                发表评论
            </button>
        </div>
        <div class="clearfix"></div>
    </div>
</div>
<?php echo form_close(); ?>